package com.hooker.plugins;

import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;

import com.hooker.base.BaseXposedLoader;

import de.robv.android.xposed.XC_MethodHook;
import de.robv.android.xposed.callbacks.XC_LoadPackage;

public class PluginEntry extends BaseXposedLoader {

    public PluginEntry(Context context, XC_LoadPackage.LoadPackageParam loadParams) {
        super(context, loadParams);
    }

    @Override
    public void hook(Object... calls) {

    }

    @Override
    public void hook(Context context, XC_LoadPackage.LoadPackageParam loadPackageParam) {

        log(",,,,,,,,,kk,,,,kkkfdhdhgdhghkkksssssssk,");

        Test.show();

        hookMethod("android.app.ContextImpl", "bindService",  Intent.class, ServiceConnection.class, int.class,
                new XC_MethodHook() {
                    @Override
                    protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
                        log(",,,,,,,,,,,,,kkkfdhdhgdhghkkkk,");

                        log(String.valueOf(param.args[0]));
                    }

                    @Override
                    protected void afterHookedMethod(MethodHookParam param) throws Throwable {
                        super.afterHookedMethod(param);
                    }
                });
    }
}
